From: Matthieu Gallien Date: Mon, 20 Jan 2025 16:10:09 +0000 (+0100) Subject: add an assert to ensure we do not use virtual file types with no VFS X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2~2^2~120^2~1 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=b8f853a135cc4f1c974260c8fecb567652334e8c;p=nextcloud-desktop.git add an assert to ensure we do not use virtual file types with no VFS if VFS mode is off, we should nto be using any virtual file types Signed-off-by: Matthieu Gallien --- diff --git a/src/libsync/discovery.cpp b/src/libsync/discovery.cpp index e2305a81e..3b9785a62 100644 --- a/src/libsync/discovery.cpp +++ b/src/libsync/discovery.cpp @@ -1712,6 +1712,16 @@ void ProcessDirectoryJob::processFileFinalize( } else { recurse = false; } + + if (!(item->isDirectory() || + (!_discoveryData->_syncOptions._vfs || _discoveryData->_syncOptions._vfs->mode() != OCC::Vfs::Off) || + item->_type != CSyncEnums::ItemTypeVirtualFile || + item->_type != CSyncEnums::ItemTypeVirtualFileDownload || + item->_type != CSyncEnums::ItemTypeVirtualFileDehydration)) { + qCCritical(lcDisco()) << "wong item type for" << item->_file << item->_type; + Q_ASSERT(false); + } + if (recurse) { auto job = new ProcessDirectoryJob(path, item, recurseQueryLocal, recurseQueryServer, _lastSyncTimestamp, this);